@extends('admin.common.base-master')

@section('html-head')
    <style type="text/css">
        .divcss5_list_title{background:#eeeeee; border:1px solid #cccccc; padding:1em;}
        .divcss5_list_content{padding:1em;}
        #tinybox{position:absolute; display:none; padding:10px; background:url('{{url('images/preload.gif')}}') no-repeat 50% 50%;  z-index:2000;}
        #tinymask{position:absolute; display:none; top:0; left:0; height:100%; width:100%; background:#000000; z-index:1500;}
        #tinycontent{background:#ffffff; font-size:1.1em;}

        #n{margin:10px auto; width:920px; border:1px solid #CCC;font-size:12px; line-height:30px;}
        #n a{ padding:0 4px; color:#333}
        .sx{padding: 10px}
        .sx-btn{width: 64px;height: 30px;background-color: #4dbcd3;color: #fff;border: #4dbcd3;border-radius: 7%;}
    </style>
    <link href="{{url('css/admin/pagenum.css')}}" rel="stylesheet" />
@endsection

@section('html-body')
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="{{route('Admin.Home.pageManager')}}">模块列表</a>
        </div>

        <div class="filter-box clearfix">
            <div class="fr" style="margin-top: 10px;">
                <a class="addBtn" href="{{route('Admin.Home.pageSet')}}">新增</a>
            </div>
        </div>

        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>模块</th>
                    <th>链接</th>
                    <th>标签</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @if(count($pages) > 0)
                    @foreach($pages as $page)
                        <tr id="page_{{$page->id}}">
                            <td>{{$page->id}}</td>
                            <td>{{$page->title}}</td>
                            <td>{{$page->link}}</td>
                            <td>{{$page->tag}}</td>
                            <td><a class="setstatus" id="status_{{$page->id}}" href="javascript:void(0);" data-id="{{$page->id}}">@if($page->status == 0)<span class="color2">显示</span> @else <span class="color4">隐藏</span> @endif</a></td>
                            <td><a class="color2" href="@if($page){{route('Admin.Home.pageSet')}}?id={{$page->id}} @endif">编辑</a> </td>
                        </tr>
                    @endforeach
                @endif
                </tbody>
                <tfoot class="order-gl">

                </tfoot>
            </table>
        </div>
    </div>
@endsection